import request from '@/utils/request';

// 获取字典服务
export function getTypelist(params) {
    return request('/api/oa/v1/common/select/typelist', {
        method: 'POST',
        params
    });
}

/**
 * 考勤管理-假期管理列表
 * @method Post

 */
export function getHolidaylist(params) {
    return request('/api/oa/v1/leavetype/leavetypelist', {
        method: 'POST',
        data: params
    });
}

/**
 * 考勤管理-删除假期列表
 * @method GET

 */

export async function holidayDelete(params) {
    return request(`/api/work/v1/attendance/leavetype/delete/${params.id}`, {
        method: 'GET'
    });
}
/**
 * 考勤管理-添加假期
 * @method Post

 */
export function addHoliday(params) {
    return request('/api/work/v1/attendance/leavetype/saveOrupdate', {
        method: 'POST',
        data: params
    });
}
/**
 * 考勤管理-编辑假期
 * @method Post

 */
export function editHoliday(params) {
    return request('/api/work/v1/attendance/leavetype/saveOrupdate', {
        method: 'POST',
        data: params
    });
}
/**
 * 考勤管理-查看假期详情
 * @method GET

 */

export async function getHolidayDetail(params) {
    return request(`/api/work/v1/attendance/leavetype/getone/${params.id}`, {
        method: 'GET'
    });
}
